<?php

namespace Topxia\Service\Kuke\Dao\Impl;

use Topxia\Service\Common\BaseDao;
use Topxia\Service\Kuke\Dao\QuestionDao;

class QuestionDaoImpl extends BaseDao implements QuestionDao
{
    protected $table = 'question';

    public function getquestionnum()
    {
        $sql = "SELECT count(id) as num FROM {$this->table}";
        //$sql = "SELECT count(id) as num FROM {$this->table} WHERE status = 'published'";
        return $this->getConnection()->fetchColumn($sql) ? : null;
    }
}